package com.itheima.mobile.controller;

import com.itheima.common.entity.Result;
import com.itheima.mobile.dto.OrderDto;
import com.itheima.mobile.service.IMemberService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;

@RestController
@RequestMapping("/member")
@Slf4j
public class MemberController {

    @Autowired
    private IMemberService memberService;

    @PostMapping("/login")
    public Result login(@RequestBody OrderDto orderDto, HttpServletResponse response) {
        return memberService.login(orderDto,response);
    }


}
